import React, {useEffect} from 'react';
import {View,} from '@tarojs/components';


import styles from './index.module.scss';
import {Image,} from "@taroify/core";

const Index: React.FC = () => {

    const cdnBase =
        'https://we-retail-static-1300977798.cos.ap-guangzhou.myqcloud.com/retail-mp';
    const imgPrefix = `${cdnBase}/`;

    const recLeftImg = `${imgPrefix}common/rec-left.png`;
    const recRightImg = `${imgPrefix}common/rec-right.png`;
    useEffect(() => {
        load();
    }, []);

    const images = [
        'https://tdesign.gtimg.com/miniprogram/template/retail/goods/nz-08a.png',
        'https://tdesign.gtimg.com/miniprogram/template/retail/goods/nz-08a1.png',
        'https://tdesign.gtimg.com/miniprogram/template/retail/goods/nz-08b.png',
    ]

    const load = async () => {

    }

    return (
        <View className={styles.page}>
            <View className={styles.page_head}>
                <Image className={styles.page_head_image} src={recLeftImg}></Image>
                <View className={styles.page_head_txt}>
                    详情介绍
                </View>
                <Image className={styles.page_head_image} src={recRightImg}></Image>

            </View>
            <View className={styles.page_body}>
                {
                    images.map((item, index) => {
                        return <Image className={styles.page_body_image} key={index} src={item}
                                      mode={'aspectFill'}></Image>
                    })
                }
            </View>
        </View>
    );
};

export default Index;
